package com.xyd.entity;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
public class Computer {

    @Resource
    private MainFrame mainFrame;

    @Resource(name = "sanXing")
    private Display display;

    public Computer() {
    }

    public Computer(MainFrame mainFrame, Display display) {
        this.mainFrame = mainFrame;
        this.display = display;
    }

    public void printComputerInfo() {
        System.out.println("电脑配置如下：");
        mainFrame.printMainFrameInfo();
        display.printDisplayInfo();

    }


    public MainFrame getMainFrame() {
        return mainFrame;
    }

    public void setMainFrame(MainFrame mainFrame) {
        this.mainFrame = mainFrame;
    }

    public Display getDisplay() {
        return display;
    }

    public void setDisplay(Display display) {
        this.display = display;
    }
}
